﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using BonsaiScrum.Core.Query;
using BonsaiScrum.Data.CustomTypes;

namespace BonsaiScrum.Data.Mappings.Query
{
    public class ProjectMap : ClassMap<ProjectReport>
    {
        public ProjectMap()
        {
            Table("Project");

            Id(x => x.Id, "ProjectID")
                .Access.BackingField();

            Map(x => x.Name, "ProjectName")
                .Access.BackingField();

            Map(x => x.Description, "ProjectDesc")
                .Access.BackingField();

            Map(x => x.Status, "ProjectStatus")
                .Access.BackingField()
                .CustomType<ProjectStatusType>();
        }
    }
}
